# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/25 16:21
# File: foundation.py
# IDE: PyCharm

from rest_framework.viewsets import GenericViewSet
from serializers.department import DepartmentSerializer
from models.department import Department
from rest_framework import filters
from django_filters.rest_framework import DjangoFilterBackend
from utils.response.response import BaseResponse
from utils.Decorators.webworkdecorator import WorkDecorator
from utils.response.httpstate import *
from utils.pagination import pagination,pageSerializer
from rest_framework.decorators import action
from rest_framework.schemas import ManualSchema
from coreapi import Field
import coreschema
from utils.choices import craft_category_choices,experience_process_choices

class FoundationViewSet(GenericViewSet):


    @WorkDecorator(operate="基础数据", message='工艺标准分类')
    @action(methods=['get'], detail=False)
    def craftCategorys(self, request, *args, **kwargs):

        return BaseResponse(data=craft_category_choices)


    @WorkDecorator(operate="基础数据", message='装修经验阶段')
    @action(methods=['get'], detail=False)
    def experienceProcess(self, request, *args, **kwargs):

        return BaseResponse(data=experience_process_choices)